package com.zjj.algorithm.learning.niuke;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @author zjj_admin
 * @date 2023/2/9 22:53
 */
public class Test59 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] c = new char[26];
        Arrays.fill(c, ' ');
        Map<Character, Integer> map = new HashMap<>();
        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (!map.containsKey(c1)) {
                map.put(c1, 1);
            } else {
                map.put(c1, map.get(c1) + 1);
            }
            for (int j = 0; j < c.length; j++) {
                if (c[j] == c1) {
                    break;
                } else if (c[j] == ' ') {
                    c[j] = c1;
                    break;
                }
            }
        }
        for (int i = 0; i < c.length; i++) {
            if(map.containsKey(c[i]) && map.get(c[i]).equals(1)){
                System.out.println(c[i]);
                return;
            }
        }
        System.out.println(-1);

    }
}
